From e7888d8f12110decc9f0435193f0cd222eaae5a9 Mon Sep 17 00:00:00 2001 From: Reedy Date: Thu, 2 Aug 2012 20:36:21 +0100 Subject: [PATCH] Don't manually quote stuff Minor parameter documentation stuffs Change-Id: Ie21cbfcf878de4efbf93f1d29900fe9d5f4c7ed2 --- includes/job/Job.php | 7 ++++--- maintenance/runJobs.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/job/Job.php b/includes/job/Job.php index 7b7ec0c22a..fcf5ca8555 100644 --- a/includes/job/Job.php +++ b/includes/job/Job.php @@ -213,8 +213,9 @@ abstract class Job { * * @param $command String: Job command * @param $title Title: Associated title - * @param $params Array: Job parameters + * @param $params Array|bool: Job parameters * @param $id Int: Job identifier + * @throws MWException * @return Job */ static function factory( $command, Title $title, $params = false, $id = 0 ) { @@ -343,8 +344,8 @@ abstract class Job { /** * @param $command * @param $title - * @param $params array - * @param int $id + * @param $params array|bool + * @param $id int */ function __construct( $command, $title, $params = false, $id = 0 ) { $this->command = $command; diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 9c1ad29a9a..946ee2b990 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -60,11 +60,11 @@ class RunJobs extends Maintenance { $wgTitle = Title::newFromText( 'RunJobs.php' ); $dbw = wfGetDB( DB_MASTER ); $n = 0; - $conds = ''; + if ( $type === false ) { $conds = Job::defaultQueueConditions( ); } else { - $conds = "job_cmd = " . $dbw->addQuotes( $type ); + $conds = array( 'job_cmd' => $type ); } while ( $dbw->selectField( 'job', 'job_id', $conds, 'runJobs.php' ) ) { -- 2.20.1